package work.linruchang.util.bean;

import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 数据库类型
 *
 * @author LinRuChang
 * @version 1.0
 * @date 2022/01/28
 * @since 1.8
 **/
@AllArgsConstructor
@Getter
public enum  DbTypeEnum {

    MYSQL,ORACLE;


    public static DbTypeEnum getType(String databaseProductName) {
        for(DbTypeEnum dbTypeEnum : values()) {
            if(StrUtil.containsIgnoreCase(databaseProductName,dbTypeEnum.name())){
                return dbTypeEnum;
            }
        }
        return null;
    }

}
